<#assign tit><#if _oper='add'>新增<#else>修改</#if>K-Yoga套餐</#assign>
<@page.html title=tit>
<script type="text/javascript" src="${_appPath!}/js/cal.js"></script>
<script type="text/javascript">
  function selAllShop(v) {
    var cbs = document.getElementsByName("shops");
    if(cbs && cbs.length>0) {
      for(var i=0; i<cbs.length; i++)
        cbs[i].checked = v;
    }
  }
</script>
<div style="width:720px;">

  <form id="fm_input" method="post" action="<#if _oper='add'>_add<#else>_edit</#if>" onsubmit="return post(this);">
    <div class="kbox">
      <div style="width:350px; float:left;">
        <table class="input">
          <tr>
            <th width="25%">编号</th>
            <td width="75%"><#if _oper='add'><input type="text" name="code" value="${combo.code!}" req="编号" size="16" maxlength="20"><#else><input type="hidden" name="code" value="${combo.code!}">${combo.code!}</#if></td>
          </tr>
          <tr>
            <th>名称</th>
            <td><input type="text" name="chName" value="${combo.chName!}" req="名称" size="26" maxlength="50"></td>
          </tr>
          <tr>
            <th>充值金额</th>
            <td><input type="text" name="chargeAmount" value="${combo.chargeAmount!}" req="充值金额" size="10" maxlength="8"></td>
          </tr>
          <tr>
            <th>赠送金额</th>
            <td><input type="text" name="presentAmount" value="${combo.presentAmount!}" req="赠送金额" size="10" maxlength="8"></td>
          </tr>
          <tr>
            <th>有效期</th>
            <td><input type="text" name="valids" value="${combo.valids!}" req="有效期" size="4" maxlength="4">
              <select name="validUnit"><#if timeUnit??><#list timeUnit as t><option value="${t.id}"<#if combo.validUnit?? && combo.validUnit=t.id> selected</#if>>${t.name}</option></#list></#if></select></td>
          </tr>
          <tr>
            <th style="height:35px;"></th>
            <td><label><input type="checkbox" name="overDueUse" value="1"<#if combo.overDueUse?? && combo.overDueUse=1> checked</#if>>续会后允许过期使用</label></td>
          </tr>
          <tr>
            <th>启用日期</th>
            <td><input type="text" class="date" name="activeTime" value="${combo.activeTime!}" onclick="cal(this);" size="10" maxlength="10"></td>
          </tr>
          <tr>
            <th>结束时间</th>
            <td><input type="text" class="date" name="inactiveTime" value="${combo.inactiveTime!}" onclick="cal(this);" size="10" maxlength="10"></td>
          </tr>
          <tr>
            <th>状态</th>
            <td><input type="radio" name="status" id="enable_1" value="1"<#if combo.status=1> checked</#if>><label for="enable_1">正常</label>
              <input type="radio" name="status" id="enable_2" value="2"<#if combo.status!=1> checked</#if>><label for="enable_2">停用</label></td>
          </tr>
          <tr>
            <th>备注</th>
            <td><textarea name="note" cols="30" rows="3">${combo.note!}</textarea></td>
          </tr>
        </table>
      </div>

      <div style="width:300px; float:left; margin-left:10px;">
        <div class="lsinfo" style="margin-top:10px;"><span style="float:right; margin-right:20px;"><label><input type="checkbox" onclick="selAllShop(this.checked);">全选</label></span>可售门店</div>
        <table class="list">
          <tr>
            <th width="13%">选择</th>
            <th width="30%">编号</th>
            <th width="45%" class="left">名称</th>
            <th width="10%"></th>
          </tr>
        </table>
        <div style="height:430px; overflow-y:auto;">
          <table class="list">
            <#if shopList??><#list shopList as t>
            <tr<#if t_index%2==1> class="line2"<#else> class="line1"</#if>>
              <td class="no"><input type="checkbox" name="shops" value="${t.code}" <#if t.status?? && t.status=1> checked</#if>/></td>
              <td>${t.code}</td>
              <td class="left">${t.chName}</td>
            </tr></#list></#if>
          </table>
        </div>
      </div>
      <div class="clear"></div>
    </div>
    <div class="button"><input type="submit" value="提 交"></div>
  </form>
</div>
</@page.html>